<script type="text/javascript" src="<?php echo ThemePath(); ?>/js/jquery-ui.js"></script>
<?php
$baseUrl = Yii::app()->theme->baseUrl;
$cs = Yii::app()->getClientScript();
$cs->registerCssFile($baseUrl . '/css/jquery-ui.css');
?>

<!-- =================order summary section start here========== -->
<section id="order-summary">
    <div class="container my-min-height">
        <div class="row">   
            <div class="col-lg-12">
                <div id="progressbar"></div>         
                <div id="Bread">
                    <ol class="breadcrumb" id="breadcrumb">
                        <li><a href="<?php echo SITE_URL; ?>">Home</a></li>
                        <li class="active">My skillhippo</li>
                    </ol>
                </div><!--bread-->
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div id="skillhippo">
                    <ul>
                        <li><a href="<?php echo $profileUrl; ?>">My Profile</a></li>
                        <li><a href="<?php echo $this->createUrl('/makeQuery/myqueries/'); ?>">My Queries</a></li>
                        <li><a href="<?php echo $this->createUrl('/mailConversation/inbox/'); ?>">My Inbox <span id="unreadmessage"></span></a></li>
                        <li><a href="<?php echo $this->createUrl('/classes/manageclasses/'); ?>">Teach</a></li>
                        <li><a href="<?php echo $this->createUrl('/users/learnuser/'); ?>">Learn</a></li>
                        <li><a href="<?php echo $this->createUrl('/users/trainerordersummery/'); ?>">Order Summary</a></li>
                    </ul>
                    <div id="tabs-1">

                    </div>
                </div>
            </div>
        </div>

        <div class="gap"></div>


    </div>


</section>

<!-- =========order summary section end here=================== -->
<script>
    $("#skillhippo").tabs({
        beforeLoad: function(event, ui) {
            jQuery('#progressbar').show();
        },
        load: function(event, ui) {
            jQuery('#progressbar').hide();
        }
    });

    function editprofile() {
        jQuery.ajax({
            'type': 'POST',
            'url': "<?php echo Yii::app()->createAbsoluteUrl("Users/editprofile"); ?>",
            'data': 'YII_CSRF_TOKEN=' + $('input[name="YII_CSRF_TOKEN"]').val(),
            'beforeSend': function(jqXHR, settings) {
                jQuery('#progressbar').show();
            },
            'success': function(data) {
                jQuery('#progressbar').hide();
                $("#ui-tabs-1").html(data);
            },
            'cache': false
        });
    }

// function createClassCourse(url) {
//        jQuery.ajax({
//            'type': 'POST',
//            'url': url,
//            'data': 'YII_CSRF_TOKEN=' + $('input[name="YII_CSRF_TOKEN"]').val(),
//            'beforeSend': function(jqXHR, settings) {
//                jQuery('#progressbar').show();
//            },
//            'success': function(data) {
//                jQuery('#progressbar').hide();
//                $("#ui-tabs-4").html(data);
//            },
//            'cache': false
//        });
//    }


    function checkProfile(action) {
        jQuery.ajax({
            'type': 'POST',
            'url': "<?php echo Yii::app()->createAbsoluteUrl("users/checkProfile"); ?>",
            'data': 'YII_CSRF_TOKEN=' + $('input[name="YII_CSRF_TOKEN"]').val() + '&action=' + action,
            'beforeSend': function(jqXHR, settings) {
                jQuery('#progressbar').show();
            },
            'success': function(data) {
                jQuery('#progressbar').hide();
                if (data == 1) {
                    $("#profileresult").html("First complete your profile.");
                    window.setTimeout(function() {
                        jQuery('#progressbar').show();
                        window.location.href = '<?php echo Yii::app()->createAbsoluteUrl("/myskillhippo"); ?>';
                    }, 5000);
                }
                else {
                    window.location.href = data;
                }
            },
            'cache': false
        });
    }

</script>
